################homework-2-2

###############create random list
import random
d_sort = { }

############# cout random to list

for i in range(20):
    
    key = random.randint(1,20)
    #print(key)
    
    if key in d_sort:
        d_sort[key] += 1
    
    else:
        d_sort[key] = 1
        
list_sort = sorted(d_sort.items(),key=lambda x:x[1],reverse=True)

for i in range(3):
    print(list_sort[i])


# 空格有点多,空行没有必要
